import request from "../utils/sendRequest";

export function searchCode(params) {
  const {
    branchId = "",
    stats = "fosho",
    repos = "*", //仓库字符串
    rng = ":20",
    q, //搜索字符串
    files = "", //包含路径
    excludeFiles = "", //排除路径
  } = params;
  return request({
    url: "/api/v1/search",
    params: {
      branchId,
      stats,
      repos,
      rng,
      q,
      files,
      excludeFiles,
      i: "nope",
      literal: "nope",
    },
    method: "GET",
  });
}
